import React, { ReactNode, useRef, useState } from 'react'
import { Button, SearchBar, Space } from 'antd-mobile'
import { SearchBarRef } from 'antd-mobile/es/components/search-bar'
import { SearchOutline, SetOutline } from 'antd-mobile-icons';
type Props = {};
export default function Header({ }: Props) {
    const searchRef = useRef<SearchBarRef>(null)
    const [icon, setIcon] = useState<ReactNode | null>(<SetOutline />)
    return (
        <Space block direction='horizontal' style={{ display: 'flex', justifyContent: "space-between" }}>
            <p onClick={() => setIcon(<SearchOutline />)}>
                地址
            </p>
            <SearchBar icon={icon} placeholder='请输入内容' />
            <p onClick={() => setIcon(<SetOutline />)}>登录</p>
        </Space>
    )
}